<include file="public@header" />
</head>
<body>
	<div class="wrap">
		<ul class="nav nav-tabs">
			<li class="active"><a >列表</a></li>
			<li><a href="{:url('skill/add')}">添加</a></li>
		</ul>
        
        <form class="well form-inline margin-top-20" method="post" action="{:url('skill/index')}">
            分类：
            <select class="form-control" name="classid" style="width: 100px;">
                <option value=''>全部</option>
                <volist name="class" id="v">
                    <option value="{$v['id']}" <if condition="input('request.classid') neq '' && input('request.classid') eq $v['id']">selected</if>>{$v['name']}</option>
                </volist>
            </select>

            名称：
            <input class="form-control" type="text" name="name" style="width: 200px;" value="{:input('request.name')}"
                   placeholder="名称">
            <input type="submit" class="btn btn-primary" value="搜索"/>
            <a class="btn btn-danger" href="{:url('skill/index')}">清空</a>
        </form>
        
		<form method="post" class="js-ajax-form" action="{:url('skill/listOrder')}">
            <div class="table-actions">
                <button class="btn btn-primary btn-sm js-ajax-submit" type="submit">{:lang('SORT')}</button>
            </div>
			<table class="table table-hover table-bordered">
				<thead>
					<tr>
                        <th width="50">{:lang('SORT')}</th>
						<th>ID</th>
						<th>分类</th>
						<th>名称</th>
						<!-- <th>名称-英文</th> -->
                        <th>封面</th>
						<th>收费方式</th>
						<th align="center">{:lang('ACTIONS')}</th>
					</tr>
				</thead>
				<tbody>
					<foreach name="list" item="vo">
					<tr>
                        <td>
                            <input name="list_orders[{$vo.id}]" class="input-order" type="text" value="{$vo.list_order}">
                        </td>
						<td>{$vo['id']}</td>
						<td>{$class[$vo['classid']]['name']}</td>
						<td>{$vo['name']}</td>
						<!-- <td>{$vo['name_en']}</td> -->
						<td><if condition="$vo['thumb']"><img class="imgtip" src="{$vo['thumb']}" style="max-width:100px;"></if></td>
						<td>{$vo['method']}</td>
						<td>	
                            <a class="btn btn-xs btn-primary" href='{:url("skill/edit",array("id"=>$vo["id"]))}'>{:lang('EDIT')}</a>
                            <a class="btn btn-xs btn-info" href='{:url("skilllevel/index",array("skillid"=>$vo["id"]))}'>段位管理</a>
                            <a class="btn btn-xs btn-info" href='{:url("label/index",array("skillid"=>$vo["id"]))}'>标签管理</a>
							<a class="btn btn-xs btn-danger js-ajax-delete" href="{:url('skill/del',array('id'=>$vo['id']))}" data-msg="技能删除，会删除所有相关信息，确定删除该技能吗？">{:lang('DELETE')}</a>
						</td>
					</tr>
					</foreach>
				</tbody>
			</table>
			<div class="pagination">{$page}</div>

		</form>
	</div>
    <div id="enlarge_images" style="position:fixed;display:none;z-index:2;"></div>
	<script src="__STATIC__/js/admin.js"></script>
</body>
</html>